package com.hilinos.common.util;

import java.util.ArrayList;
import java.util.List;

/**
 * @author qhl
 */
public class ListUtils<T> {

    private List<T> list = new ArrayList<>();

    private ListUtils() {
    }

    public static ListUtils<Object> getObjectInstance() {
        return new ListUtils<>();
    }

    public static ListUtils<String> getStringInstance() {
        return new ListUtils<>();
    }

    public static <T> ListUtils<T> getInstance(Class<T> cls) {
        return new ListUtils<>();
    }


    public ListUtils<T> add(T t) {
        list.add(t);
        return this;
    }

    public List<T> build() {
        return list;
    }

}
